home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Jumpstart / Multimedia Microsoft Jumpstart Version 1.1a (Microsoft).BIN / develpmt / sdk / vfw11.win / vfwdk / icsample.h_ / icsample.bin
Encoding:
Text File  |  1993-11-19  |  5.1 KB  |  103 lines

  1. /****************************************************************************
  2.  *
  3.  *   icsample.h
  4.  *
  5.  ***************************************************************************/
  6. /**************************************************************************
  7.  *
  8.  *  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  9.  *  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  10.  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  11.  *  PURPOSE.
  12.  *
  13.  *  Copyright (c) 1992, 1993  Microsoft Corporation.  All Rights Reserved.
  14.  * 
  15.  **************************************************************************/
  16.  
  17. typedef struct {
  18.     WORD        wPixelKeepRatio;
  19.     WORD        wColorBitsToDrop;
  20. } DECOMPRESS_INFO;
  21.  
  22. typedef struct {
  23.     DWORD            fccHandler;             // this should be your handler
  24.     DECOMPRESS_INFO  dInfo;
  25. } ICSTATE;
  26.  
  27. typedef struct {
  28.     DWORD            dwSize;
  29.     DECOMPRESS_INFO  dInfo;
  30. } DECOMP_FORMAT, *PDECOMP_FMT, FAR *LPDECOMP_FMT;
  31.  
  32. typedef struct {
  33. /********************************************************************/
  34. //
  35. //  These two fields MUST be first and in this order.
  36. //
  37.     DWORD       fccType;         // gives type of our state info ('vidc')
  38.                                  // this allows us to combine 'vcap' or other
  39.                                  // stream/ICM types into one driver
  40.     DRIVERPROC  DriverProc;      // driver proc for the instance
  41. /********************************************************************/
  42.     DWORD       dwFlags;         // flags from ICOPEN
  43.     ICSTATE     CurrentState;       // current state of compressor.
  44.     DECOMP_FORMAT DecompressFmt; // format for decompression
  45.     BOOL        fCompress;       // count of COMPRESS_BEGIN calls
  46.     BOOL        fDecompress;     // count of DECOMPRESS_BEGIN calls
  47.     BOOL        fDrawBegun;      // have we received a DRAW_BEGIN?
  48.     LONG (CALLBACK *Status) (LPARAM lParam, UINT message, LONG l);
  49.     LPARAM    lParam;                // for status procedure
  50. } INSTINFO, *PINSTINFO;
  51.  
  52. #define STATUS_EVERY    16    // report status every 16 lines....
  53.  
  54. BOOL       NEAR PASCAL Load(void);
  55. void       NEAR PASCAL Free(void);
  56. INSTINFO * NEAR PASCAL Open(ICOPEN FAR *icinfo);
  57. DWORD      NEAR PASCAL Close(INSTINFO * pinst);
  58. DWORD       NEAR PASCAL GetState(INSTINFO * pinst, LPVOID pv, DWORD dwSize);
  59. DWORD      NEAR PASCAL SetState(INSTINFO * pinst, LPVOID pv, DWORD dwSize);
  60. DWORD       NEAR PASCAL GetInfo(INSTINFO * pinst, ICINFO FAR *icinfo, DWORD dwSize);
  61.  
  62. BOOL       NEAR PASCAL QueryAbout(INSTINFO * pinst);
  63. DWORD      NEAR PASCAL About(INSTINFO * pinst, HWND hwnd);
  64. BOOL       NEAR PASCAL QueryConfigure(INSTINFO * pinst);
  65. DWORD       NEAR PASCAL Configure(INSTINFO * pinst, HWND hwnd);
  66.  
  67. LRESULT    NEAR PASCAL CompressBegin(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut);
  68. LRESULT    NEAR PASCAL CompressQuery(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiIn,LPBITMAPINFOHEADER lpbiOut);
  69. LRESULT    NEAR PASCAL CompressGetFormat(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut);
  70. LRESULT    NEAR PASCAL Compress(INSTINFO * pinst,ICCOMPRESS FAR *icinfo, DWORD dwSize);
  71. LRESULT    NEAR PASCAL CompressGetSize(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut);
  72. LRESULT    NEAR PASCAL CompressEnd(INSTINFO * lpinst);
  73.  
  74. LRESULT    NEAR PASCAL DecompressGetFormat(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut);
  75. LRESULT    NEAR PASCAL DecompressGetPalette(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiIn, LPBITMAPINFOHEADER lpbiOut);
  76. LRESULT    NEAR PASCAL DecompressBegin(INSTINFO * pinst, DWORD dwFlags, LPBITMAPINFOHEADER lpbiSrc, LPVOID pSrc, int xSrc, int ySrc, int dxSrc, int dySrc, LPBITMAPINFOHEADER lpbiDst, LPVOID pDst, int xDst, int yDst, int dxDst, int dyDst);
  77. LRESULT    NEAR PASCAL DecompressQuery(INSTINFO * pinst, DWORD dwFlags, LPBITMAPINFOHEADER lpbiSrc, LPVOID pSrc, int xSrc, int ySrc, int dxSrc, int dySrc, LPBITMAPINFOHEADER lpbiDst, LPVOID pDst, int xDst, int yDst, int dxDst, int dyDst);
  78. LRESULT    NEAR PASCAL Decompress(INSTINFO * pinst, DWORD dwFlags, LPBITMAPINFOHEADER lpbiSrc, LPVOID pSrc, int xSrc, int ySrc, int dxSrc, int dySrc, LPBITMAPINFOHEADER lpbiDst, LPVOID pDst, int xDst, int yDst, int dxDst, int dyDst);
  79. LRESULT    NEAR PASCAL DecompressEnd(INSTINFO * pinst);
  80.  
  81. BOOL       NEAR PASCAL DrawQuery(INSTINFO * pinst, LPBITMAPINFOHEADER lpbiInput);
  82. LRESULT    NEAR PASCAL DrawBegin(INSTINFO * pinst,ICDRAWBEGIN FAR *icinfo, DWORD dwSize);
  83. LRESULT    NEAR PASCAL Draw(INSTINFO * pinst,ICDRAW FAR *icinfo, DWORD dwSize);
  84. LRESULT    NEAR PASCAL DrawEnd(INSTINFO * pinst);
  85.  
  86. /********************************************************************
  87.  ********************************************************************/
  88.  
  89. #define ID_SCROLL   101
  90. #define ID_TEXT     102
  91. #define ID_SCROLL2  103
  92. #define ID_TEXT2    104 
  93.  
  94. /********************************************************************
  95.  ********************************************************************/
  96.  
  97. #ifdef DEBUG
  98.     extern void FAR CDECL dprintf(LPSTR, ...);
  99.     #define DPF dprintf
  100. #else
  101.     #define DPF / ## /
  102. #endif
  103.